package belajarzk.ui.render.component;

import org.zkoss.zk.ui.event.Event;
import org.zkoss.zul.Window;

public class WindowComponent extends Window {

	/**
	 * 
	 */
	private static final long serialVersionUID = 5222655096779362137L;

	@Override
	public void onClose() {
		setVisible(false);
	}

	public void onCreate() throws Exception {
		System.out.println("here");
		setCtrlKeys("#f2@a");
		System.out.println("CTRL keys are: " + getCtrlKeys());
		setPosition("center,center");
		setMode("popup");
		setClosable(false);
	}

	public void onCtrlKey(Event event) {
		System.out.println("Ctrl key clicked ... "+event.toString()+" - "+event.hashCode()+" - "+event.getTarget());
	}

	public void onCancel() {
		setVisible(false);
		System.out.println("ESC pressed.");
	}

}
